<div class="head" id="ViewContactHead">
	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('Edit', true), array('action'=>'edit', (int)$contact['Contact']['id'])); ?> </li>
			<li><?php echo $html->link(__('Delete', true), array('action'=>'delete', (int)$contact['Contact']['id']), null, __('Are you sure you want to delete contact #', true) . $contact['Contact']['id'] . '?'); ?> </li>
		</ul>
	</div>
	<?php 
		if (file_exists(IMAGES.DS.'contacts'.DS.$contact['Contact']['id'].'.gif')) {
			echo $html->image('contacts/'.$contact['Contact']['id'].'.gif', array('class'=>'logo'));
		} else { 
			echo $html->image('/img/'.($contact['Contact']['kind']=='T'?'person.gif':'company.gif'), array('class'=>'logo'));
		}
	?>
	<h2><?php echo h($contact['Contact']['title']); ?></h2>
	<?php
		if ( !empty($contact['Contact']['job'])) {
			echo ', '.h($contact['Contact']['job']);
		} else {
			if (!empty($contact['Company']['title'])) {
				echo ', '; 
				__('employed');
			}
		}
		if (!empty($contact['Company']['title'])) {
			__(' at ');
			echo $html->link($contact['Company']['title'], array(
				'controller'=>'contacts', 
				'action'=>'view', 
				$contact['Company']['id'], 
				strtotime($contact['Company']['modified'])));
		}
	?>
	<div id="TagList">
		<?php
			echo $html->image('/img/tag.gif');
			if (!empty($contact)) echo $this->element('tags/index', array('ref_type'=>$contact['Contact']['kind'], 'ref_id'=>(int)$contact['Contact']['id'], 'referer'=>$referer));
		?>
	</div>
</div>
<div class="contacts index" id="EventIndex">
	<?php 
		echo $this->requestAction('/events/report/contact:'.(int)$contact['Contact']['id'], array('return')); 
		//echo $this->requestAction(array('controller'=>'events','action'=>'index','contact'=>(int)$contact['Contact']['id']), array('return')); 
	?>
</div>